package com.example.servicefeign.service;

import com.example.servicefeign.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "eureka-client", fallback = SchedualServiceHiHystric.class)
public interface SchedualServiceHi {

    @RequestMapping(value = "/eureka-client/sayHi",method = RequestMethod.GET)
    String sayHiFromClientOne(@RequestParam(value = "name") String name);

    @PostMapping(value = "/eureka-client/getUser")
    User getUserFromClientOne(@RequestBody User user);

    @PostMapping(value = "/eureka-client/getParam")
    String getUserFromClientOne(@RequestParam(value = "name") String name);

}
